package org.tc.shopmall.service;

import Dto.OrdersDto;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.tc.shopmall.entity.Orderdetails;

import java.util.List;

@RequestMapping("/OrderdetailService")
public interface OrderdetailService {
    @PostMapping("/insert")
    int insert(@RequestBody Orderdetails record);

    @PostMapping("/insertOrder")
    int insertOrder(@RequestBody OrdersDto ordersDto);

    @RequestMapping("/selectAll")
    List<Orderdetails> selectAll();

    @RequestMapping("/selectOneOrderId")//查询订单号
    Integer selectOneOrderId();

    @PostMapping("/deleteById")
    int deleteById(@RequestParam("id") Integer id, @RequestParam("commodityid") Integer commodityid);

    @PostMapping("/selectById")
    Orderdetails selectById(@RequestParam("id") Integer id);
}
